package com.meijin.spring6.autowired.service;

import com.meijin.spring6.autowired.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @Author meijindeng
 * @Data 2023-09-03 18:38
 * @Description UserServiceImpl
 * @Version 1.0
 */
@Service
public class UserServiceImpl implements UserService {

    //第六种：@Autowired 注解和 @Qualifier 注解联合使用
    @Autowired
    @Qualifier(value = "userRedisDaoImpl")
    private UserDao userDao;

    @Override
    public void add() {
        System.out.println("service add方法执行了。。。");
        userDao.add();
    }
}
